
// Copyright (C) 2007 Richard Uhler
// This file is part of Esiply.
//
// Esiply is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License, Version 2,
// as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef _VALUE_TYPE_H_
#define _VALUE_TYPE_H_

// Ecma 8
// A value is an entity that takes on one of nine types. There are
// nine types (Undefined, Null, Boolean, String, Number, Object, Reference,
// List, and Completion). Values of type Reference, List, and Completion
// are used only as intermediate results of expression evaluation and
// cannot be stored as properties of objects.

enum ValueType
{
    VT_BOOLEAN,
    VT_COMPLETION,
    VT_LIST,
    VT_NULL,
    VT_NUMBER,
    VT_OBJECT,
    VT_REFERENCE,
    VT_STRING,
    VT_UNDEFINED,
};

bool isPrimitive(ValueType type);

#endif//_VALUE_TYPE_H_

